﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Arcana.Contract
{
    /// <summary>
    /// This class represents roles of contracts that participate in all contract expressions.
    /// </summary>
    /// <remarks>
    /// These roles help PostSharp compiler to organize aspects. They have to be used with <see cref="PostSharp.Aspects.Dependencies.AspectRoleDependencyAttribute"/> class when creating new aspects that may be applied to methods and properties which also use Arcana Contract contract aspects.
    /// </remarks>
    public static class Roles
    {
        /// <summary>
        /// Targets all contracts specified by Arcana.Contract namespace.
        /// </summary>
        public const string Contract = "Contract";
        /// <summary>
        /// Targets all method contracts.
        /// </summary>
        public const string Method = "MethodContract";
        /// <summary>
        /// Targets all property contracts.
        /// </summary>
        public const string Property = "PropertyContract";
        /// <summary>
        /// Targets all method contracts that validate arguments.
        /// </summary>
        public const string Argument = "MethodArgumentContract";
        /// <summary>
        /// Targets all method contracts that validate return value.
        /// </summary>
        public const string ReturnValue = "MethodReturnValueContract";
        /// <summary>
        /// Targets all contracts that check for <b>null</b> values.
        /// </summary>
        public const string NullCheck = "NullCheckContract";
        /// <summary>
        /// Targets all contracts that check for a condition other than <b>null</b> values.
        /// </summary>
        public const string Conditional = "ConditionalContract";
    }
}
